package KeyWord.Static;

public class Demo03StaticStudent {
    public static void main(String[] args) {
        //首先给静态变量room传个值，因为是静态成员变量，所以我们使用类名调用
        Student.room = "101教室";

        Student one = new Student("郭靖",30);
        System.out.println("one的名字"+one.getName());
        System.out.println("one的年龄"+one.getAge());
        System.out.println("one的教室"+Student.room);

        System.out.println("=====================");

        Student two = new Student("郭靖",30);
        System.out.println("two的名字"+two.getName());
        System.out.println("two的年龄"+two.getAge());
        System.out.println("two的教室"+Student.room);

    }
}
